home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Choice 6
/
Choice CD-ROM 6 - Disc 1.iso
/
qtwsetup
/
setup.mst
< prev
next >
Wrap
Text File
|
1995-06-16
|
13KB
|
401 lines
'**************************************************************************
'* QuickTime for Windows 2.0.3セットアップ
'**************************************************************************
'$DEFINE DEBUG ''Define for script development/debugging
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
''Dialog ID's
CONST WELCOME = 100
CONST ASKQUIT = 200
CONST STARTQT20 = 210 ''QTWインストール開始メッセージ
CONST NUKEOLD = 220 ''QTW削除のウィンドウ
CONST EXITFAILURE = 400
CONST EXITQUIT = 600
CONST EXITSUCCESS = 700
CONST OPTIONS = 800
CONST APPHELP = 1000
CONST BADPATH = 6400
CONST BILLBOARD = 4545
CONST CHOPTIONS = 2500
CONST OLDMESS = 5010 '' インストール済みQTWを検索中メッセージ
CONST OPTIONHELP = 900 ''オプションのヘルプ
CONST QTWHELP = 910 ''QTW削除のヘルプ
CONST FILES_REMOVED = 1
CONST FILES_SKIPPED = 2
CONST RENAME_OK = 1
CONST RENAME_NG = 2
CONST BADWINDOWS = 101
CONST MB_OKCANCEL = 1
CONST MB_ABORTRETRYIGNORE = 2
CONST MB_YESNOCANCEL = 3
CONST MB_YESNO = 4
CONST MB_RETRYCANCEL = 5
CONST MB_TYPEMASK = 15
CONST MB_ICONQUESTION = 32
CONST MB_ICONEXCLAMATION = 48
CONST MB_ICONASTERISK = 64
CONST MB_ICONINFORMATION = MB_ICONASTERISK
CONST MB_ICONSTOP = MB_ICONHAND
''Bitmap ID
CONST LOGO = 1
GLOBAL WINSYSDIR$ '' Windows\system dirctory.
GLOBAL WINDIR$ '' Windows directory.
GLOBAL CUIDLL$
GLOBAL HELPPROC$
GLOBAL GROUP$ ''グループ名
DECLARE SUB InstallQTW
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE FUNCTION MakePath2 (szDir$, szFile$) AS STRING
DECLARE FUNCTION BitmapCntrlInit LIB "mscuistf.dll" as INTEGER
DECLARE FUNCTION CheckForOld AS INTEGER ''インストール済みQTW検索
DECLARE FUNCTION RemoveOldQTFiles (FilePath$) AS INTEGER ''QTWファイルの消去
DECLARE SUB RenameOldQT (szFilePath$) ''QTWファイルのリネーム
DECLARE SUB RenameOldQTr ''QTWファイルのリネームを元に戻す
DECLARE FUNCTION ShowWindow LIB "user" (ss%,ss%) AS INTEGER
''Dialog list symbol names
GLOBAL HARDDRIVES$
GLOBAL QTDIRLIST$
INIT:
CUIDLL$ = "mscuistf.dll" ''Custom user interface dll
HELPPROC$ = "FHelpDlgProc" ''Help dialog procedure
SetBitmap CUIDLL$, LOGO
SetTitle "QuickTime for Windows セットアップ"
SetAbout "QuickTime for Windows セットアップ", "バージョン 2.0.2"
i % = ShowWindow(HwndFrame(),3) ''フルスクリーン
HARDDRIVES$ = "HardDrives" ''ハードディスクのリスト
QTDIRLIST$ = "Qtdirlist" ''QTWを残すディレクトリ
GROUP$ = "QuickTime for Windows"
GetLocalHardDrivesList HARDDRIVES$
szInf$ = GetSymbolValue("STF_SRCINFPATH")
IF szInf$ = "" THEN
szInf$ = GetSymbolValue("STF_CWDDIR") + "SETUP.INF"
END IF
ReadInfFile szInf$
rem Make sure that we are running on Windows 3.1 or better
rem ------------------------------------------------------
IF GetWindowsMajorVersion() < 3 THEN
sz$ = UIStartDlg(CUIDLL$, BADWINDOWS, "FInfo0DlgProc", 0, "")
UIPop 1
END
END IF
IF (GetWindowsMajorVersion() = 3) AND (GetWindowsMinorVersion() < 10) THEN
sz$ = UIStartDlg(CUIDLL$, BADWINDOWS, "FInfo0DlgProc", 0, "")
UIPop 1
END
END IF
WINDIR$ = GetWindowsDir()
WINSYSDIR$ = GetWindowsSysDir()
W$ = MID$(GetWindowsDir, 1, 1)
IF (IsDriveValid(W$) = 0) OR (W$ = "") THEN
i% = DoMsgBox("Windows ドライブ ('"+W$+"') は、無効なドライブです。", "エラー", MB_TASKMODAL+MB_ICONHAND+MB_OK)
END
END IF
WELCOME:
sz$ = UIStartDlg(CUIDLL$, WELCOME, "FInfoDlgProc", APPHELP, HELPPROC$)
IF sz$ = "CONTINUE" THEN
UIPop 1
ELSEIF sz$ = "REACTIVATE" THEN
GOTO WELCOME
ELSE
GOSUB ASKQUIT
GOTO WELCOME
END IF
rem **
rem * QTW2.0.3 をインストール
rem ******************************************************************************
QTW20INST:
InstallQTW
rem *************************************************************************************
rem QUIT
rem *************************************************************************************
QUIT:
ON ERROR GOTO ERRQUIT
IF ERR = 0 THEN
dlg% = EXITSUCCESS
ELSEIF ERR = STFQUIT THEN
dlg% = EXITQUIT
ELSE
dlg% = EXITFAILURE
END IF
QUITL1:
sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO QUITL1
END IF
UIPop 1
END
ERRQUIT:
i% = DoMsgBox("セットアップでエラーが発生しました。", "エラー", MB_OK+MB_TASKMODAL+MB_ICONSTOP)
END
BADPATH:
sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
IF sz$ = "REACTIVATE" THEN
GOTO BADPATH
END IF
UIPop 1
RETURN
ASKQUIT:
ASKQUIT1:
sz$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
IF sz$ = "EXIT" THEN
UIPopAll
ERROR STFQUIT
ELSEIF sz$ = "REACTIVATE" THEN
GOTO ASKQUIT1
ELSE
UIPop 1
END IF
RETURN
rem **
rem ** QTW2.0.3.51のインストール
rem *************************************************************************
SUB InstallQTW STATIC
i% = CheckForOld() ''古いQTWの削除
SrcDir$ = GetSymbolValue("STF_SRCDIR")
AddSectionFilesToCopyList "Files 1", SrcDir$, WINSYSDIR$
AddSectionFilesToCopyList "Files 2", SrcDir$, WINDIR$
CopyFilesInCopyList
CreateIniKeyValue "WIN.INI", "Extensions", "mov", MakePath(WINDIR$,"player.exe") + " ^.mov", cmoOverwrite
CreateIniKeyValue "WIN.INI", "Extensions", "pic", MakePath(WINDIR$,"viewer.exe") + " ^.pic", cmoOverwrite
CreateIniKeyValue "WIN.INI", "MCI Extensions", "mov", "QTWVideo", cmoOverwrite
CreateIniKeyValue "WIN.INI", "MCI Extensions", "pic", "QTWVideo", cmoOverwrite
CreateIniKeyValue "WIN.INI", "MCI Extensions", "jpg", "QTWVideo", cmoOverwrite
CreateIniKeyValue MakePath(WINDIR$,"SYSTEM.INI"), "MCI","QTWVideo",MakePath(WINSYSDIR$, "mciqtw.drv"), cmoOverwrite
CreateIniKeyValue MakePath(WINDIR$,"SYSTEM.INI"), "Macx","DeviceBitmap","OFF", cmoOverwrite
rem i% = WritePrivateProfileString("Macx", "DeviceBitmap", "OFF", "SYSTEM.INI")
CreateIniKeyValue "WIN.INI", "Mach", "devicebitmap", "off", cmoOverwrite
RUN MakePath(WINDIR$, "player.exe") + " install"
RUN MakePath(WINDIR$, "viewer.exe") + " install"
rem Create a Program Manager group
rem ------------------------------
CreateProgmanGroup GROUP$, "", cmoNone
CreateProgmanItem GROUP$, "Movie Player", MakePath(WINDIR$,"PLAYER.EXE"), "", cmoOverwrite
CreateProgmanItem GROUP$, "Picture Viewer", MakePath(WINDIR$,"VIEWER.EXE"), "", cmoOverwrite
END SUB
rem *
rem * QuickTimeの古いバージョンがあるかチェックする
rem *************************************************************************
FUNCTION CheckForOld STATIC AS INTEGER
sz$ = UIStartDlg(CUIDLL$, OLDMESS, "FModelessDlgProc", 0, "")
GetLocalHardDrivesList "HardDrives"
NumDrives% = GetListLength("HardDrives")
IF (NUMDRIVES% > 0) THEN
FOR i% = 1 TO NumDrives% STEP 1
CurrentDrive$ = GetListItem("HardDrives",i%) + ":\"
CheckForOld3:
cursor% = ShowWaitCursor()
OldFilePath$ = FindFileInTree("qtim.dll",CurrentDrive$)
RestoreCursor cursor%
IF (OldFilePath$ <> "") THEN
j% = RemoveOldQTFiles(OldFilePath$)
GOTO CheckForOld3
END IF
NEXT i%
END IF
UIPOP 1
IF (NUMDRIVES% > 0) THEN
RenameOldQTr
END IF
END FUNCTION
rem *
rem * QTIM.DLLをQTIM.DL_にリネームして見つからないようにする
rem ***************************************************************************
SUB RenameOldQT (szFilePath$) STATIC
SPLITPATH szFilePath$, drv$, dir$, filename$, ext$
RenameFile szFilePath$,filename$+".DL_"
AddListItem QTDIRLIST$, szFilePath$
END SUB
rem *
rem * リネームしておいたQTIM.DLLを元に戻す
rem ***************************************************************************
SUB RenameOldQTr STATIC
n% = GetListLength(QTDIRLIST$)
IF (n% > 0) THEN
FOR i% = 1 TO n% STEP 1
rFilePath$ = GetListItem(QTDIRLIST$,i%)
SPLITPATH rFilePath$, drv$, dir$, filename$, ext$
RenameFile drv$+dir$+filename$+".DL_", filename$+ext$
NEXT i%
END IF
END SUB
FUNCTION RemoveOldQTFiles (FilePath$) STATIC AS INTEGER
RemoveOldQTFiles = FILES_SKIPPED
SPLITPATH FilePath$, drv$, dir$, filename$, ext$
DeadPath$ = drv$ + dir$
rem check version resources if they exist
szVersion$ = GetVersionOfFile(FilePath$)
rem dialog choices are Remove,Skip ("Continue","Back" buttons)
SetSymbolValue "EditTextIn", DeadPath$+" ** Version[" + szVersion$ + "] **"
ROldQT1:
sz$ = UIStartDlg(CUIDLL$, NUKEOLD, "FEditDlgProc", QTWHELP, HELPPROC$)
UIPop 1
IF sz$ = "BACK" THEN
RenameOldQT(FilePath$)
EXIT FUNCTION
END IF
IF sz$ = "REACTIVATE" THEN
GOTO ROldQT1
END IF
IF sz$ <> "CONTINUE" THEN
RenameOldQT(FilePath$)
EXIT FUNCTION
END IF
rem all versions
RemoveFile MakePath(DeadPath$, "qtim.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtimcmgr.dll"), cmoForce
rem version 1.0.0
RemoveFile MakePath(DeadPath$, "qcmc.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtjpeg.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtraw.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtsmc.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtrpza.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtrle.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtcvid.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtrt21.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtvhdw.dll"), cmoForce
rem version 1.1.x and later
RemoveFile MakePath(DeadPath$, "mciqtw.drv"), cmoForce
RemoveFile MakePath(DeadPath$, "qcmc.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtjpeg.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtraw.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtsmc.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtrpza.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtrle.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtcvid.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtrt21.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "navg.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtiv31.qtc"), cmoForce
rem version 1.9 and later
RemoveFile MakePath(DeadPath$, "qtvhdw.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtyvu9.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtmsvc.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtiv32.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtiyvu9.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtvhdw.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "dhio_dh.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "reelmgic.qtc"), cmoForce
rem 追加
RemoveFile MakePath(DeadPath$, "mciqtenu.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qthndlr.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtnotify.exe"), cmoForce
RemoveFile MakePath(DeadPath$, "qtold.qtc"), cmoForce
RemoveFile MakePath(DeadPath$, "qtole.dll"), cmoForce
RemoveFile MakePath(DeadPath$, "qtrpza.qtc"), cmoForce
RemoveOldQTFiles = FILES_REMOVED
END FUNCTION
'**
'** Purpose:
'** Appends a file name to the end of a directory path,
'** inserting a backslash character as needed.
'** Arguments:
'** szDir$ - full directory path (with optional ending "\")
'** szFile$ - filename to append to directory
'** Returns:
'** Resulting fully qualified path name.
'*************************************************************************
FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
IF szDir$ = "" THEN
MakePath = szFile$
ELSEIF szFile$ = "" THEN
MakePath = szDir$
ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
MakePath = MakePath2(szDir$, szFile$)
ELSE
MakePath = szDir$ + "\" + szFile$
END IF
END FUNCTION
'**
'** Purpose:
'** If ending "\" is a tailbyte of a DBCS character, append a "\"
'** to the end of the file name.
'** Arguments:
'** szDir$ - full directory path (with optional ending "\")
'** szFile$ - filename to append to directory
'** Returns:
'** Resulting fully qualified path name.
'*************************************************************************
FUNCTION MakePath2 (szDir$, szFile$) STATIC AS STRING
IF IsDBCSChar(szDir$, LEN(szDir$)) = 2 THEN
MakePath2 = szDir$ + "\" + szFile$
ELSE
MakePath2 = szDir$ + szFile$
END IF
END FUNCTION